//
//  HotCell.m
//  ZhiHuiLiJiang
//
//  Created by Work on 2018/11/18.
//  Copyright © 2018年 王雅鹏. All rights reserved.
//已废弃

#import "HotCell.h"

@implementation HotCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self addView];
    }
    return self;
}

-(void)addView{
    
    [self.contentView addSubview:self.HimageView];
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.tagLabel];
    [self.contentView addSubview:self.numLabel];
    [self.HimageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.mas_equalTo(self.contentView);
        make.height.mas_equalTo(184);
    }];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.HimageView.mas_bottom).offset(12);
        make.left.mas_equalTo(self.mas_left).offset(20);
    }];
    [self.tagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).offset(20);
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(10);

    }];
    [self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.tagLabel.mas_right).offset(20);
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(10);

    }];
}
-(UIImageView *)HimageView{
    if (!_HimageView) {
        _HimageView = [[UIImageView alloc]init];
    }
    return _HimageView;
}
-(UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel  = [[UILabel alloc]init];
        _titleLabel.font = H18;
        _titleLabel.textColor = RGBA(0, 0, 0, 0.8);
        _titleLabel.numberOfLines = 0;
        [_titleLabel sizeToFit];
    }
    return _titleLabel;
}
-(UILabel *)tagLabel{
    if (!_tagLabel) {
        _tagLabel = [[UILabel alloc]init];
        _tagLabel.font = H11;
        _tagLabel.textColor = RGBA(70, 70, 70, 0.9);
        [_tagLabel sizeToFit];
    }
    return _tagLabel;
}
-(UILabel *)numLabel{
    if (!_numLabel) {
        _numLabel = [[UILabel alloc]init];
        _numLabel.font = H11;
        _numLabel.textColor = RGBA(222, 76, 76, 0.9);
    }
    return _numLabel;
}
-(void)setModel:(BYcitizenModel *)model{
    
    self.tagLabel.text =model.tag;
    self.titleLabel.text =model.title;
    self.numLabel.text =model.time;

}

@end
